﻿<Page x:Class="MediaLibrary.PersonalPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    Title="FavoritesPage">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>

        <TabControl Background="Transparent">
            <TabItem Header="music stats" Background="Transparent" FontSize="14">
                <Grid Grid.Row="0" Background="Black" Opacity="0.7" Margin="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Grid Grid.Row="0" Grid.Column="0" Margin="6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0" Style="{StaticResource favoritesBigLabel}" Margin="0 0 0 0">most played</TextBlock>

                        <ListView  
                        Name="mostPlayedMusicListView"
                        SelectionMode="Extended" 
                        ScrollViewer.CanContentScroll="True" 
                        AllowDrop="True" 
                        Background="Transparent"
                        BorderThickness="0"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        Margin="7 0 0 0"
                        MouseDoubleClick="mostPlayedMusicListView_MouseDoubleClick"
                        HorizontalContentAlignment="Stretch"
                        ItemContainerStyle="{DynamicResource favoritesSelectedStyle}"
                        Grid.Row="1">

                            <ListView.ContextMenu>
                                <ContextMenu>
                                    <MenuItem Header="Add to Now Playing" Click="addToNowPlayingResult_OnClick" />
                                    <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingResult_OnClick" />
                                    <Separator />
                                    <MenuItem Header="Playlists">
                                        <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistResult_OnClick" />
                                        <MenuItem Header="Add to Playlist" Click="addToPlaylistResult_OnClick" />
                                    </MenuItem>
                                </ContextMenu>
                            </ListView.ContextMenu>
                        </ListView>
                    </Grid>

                    <Grid Grid.Row="0" Grid.Column="1" Margin="6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0" Style="{StaticResource favoritesBigLabel}" Margin="0 0 0 0">recently played</TextBlock>

                        <ListView 
                        Name="recentlyPlayedMusicListView"
                        SelectionMode="Extended" 
                        ScrollViewer.CanContentScroll="True" 
                        AllowDrop="True" 
                        Background="Transparent"
                        BorderThickness="0"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        Margin="7 0 0 0"
                        MouseDoubleClick="recentlyPlayedMusicListView_MouseDoubleClick"
                        HorizontalContentAlignment="Stretch"
                        ItemContainerStyle="{DynamicResource favoritesSelectedStyle}"
                        Grid.Row="1">

                            <ListView.ContextMenu>
                                <ContextMenu>
                                    <MenuItem Header="Add to Now Playing" Click="addToNowPlayingResult2_OnClick" />
                                    <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingResult2_OnClick" />
                                    <Separator />
                                    <MenuItem Header="Playlists">
                                        <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistResult2_OnClick" />
                                        <MenuItem Header="Add to Playlist" Click="addToPlaylistResult2_OnClick" />
                                    </MenuItem>
                                </ContextMenu>
                            </ListView.ContextMenu>
                        </ListView>
                    </Grid>

                    <Grid Grid.Row="1" Grid.Column="0" Margin="6 10 6 6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0" Style="{StaticResource favoritesBigLabel}" Margin="0 0 0 0">favorites</TextBlock>

                        <ListView 
                        Name="favoriteMusicListView"
                        SelectionMode="Extended" 
                        ScrollViewer.CanContentScroll="True" 
                        AllowDrop="True" 
                        Background="Transparent"
                        BorderThickness="0"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        Margin="7 0 0 0"
                        MouseDoubleClick="favoriteMusicListView_MouseDoubleClick"
                        HorizontalContentAlignment="Stretch"
                        ItemContainerStyle="{DynamicResource favoritesSelectedStyle}"
                        Grid.Row="1">

                            <ListView.ContextMenu>
                                <ContextMenu>
                                    <MenuItem Header="Add to Now Playing" Click="addToNowPlayingResult3_OnClick" />
                                    <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingResult3_OnClick" />
                                    <Separator />
                                    <MenuItem Header="Playlists">
                                        <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistResult3_OnClick" />
                                        <MenuItem Header="Add to Playlist" Click="addToPlaylistResult3_OnClick" />
                                    </MenuItem>
                                </ContextMenu>
                            </ListView.ContextMenu>
                        </ListView>
                    </Grid>

                    <Grid Grid.Row="1" Grid.Column="1" Margin="6 10 6 6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0" Style="{StaticResource favoritesBigLabel}" Margin="0 0 0 0">highest rated</TextBlock>

                        <ListView 
                        Name="highestRatedMusicListView"
                        SelectionMode="Extended" 
                        ScrollViewer.CanContentScroll="True" 
                        AllowDrop="True" 
                        Background="Transparent"
                        BorderThickness="0"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        Margin="7 0 0 0"
                        HorizontalContentAlignment="Stretch"
                        ItemContainerStyle="{DynamicResource favoritesSelectedStyle}"
                        MouseDoubleClick="pinnedMusicListView_MouseDoubleClick"
                        Grid.Row="1">

                            <ListView.ContextMenu>
                                <ContextMenu>
                                    <MenuItem Header="Add to Now Playing" Click="addToNowPlayingResult4_OnClick" />
                                    <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingResult4_OnClick" />
                                    <Separator />
                                    <MenuItem Header="Playlists">
                                        <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistResult4_OnClick" />
                                        <MenuItem Header="Add to Playlist" Click="addToPlaylistResult4_OnClick" />
                                    </MenuItem>
                                </ContextMenu>
                            </ListView.ContextMenu>
                        </ListView>
                    </Grid>
                </Grid>
            </TabItem>

            <TabItem Header="video stats" Background="Transparent" FontSize="14">
                <Grid Grid.Row="0" Background="Black" Opacity="0.7" Margin="0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Grid Grid.Row="0" Grid.Column="0" Margin="6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0" Style="{StaticResource favoritesBigLabel}" Margin="0 0 0 0">most played</TextBlock>

                        <ListView  
                        Name="mostPlayedVideoListView"
                        SelectionMode="Extended" 
                        ScrollViewer.CanContentScroll="True" 
                        AllowDrop="True" 
                        Background="Transparent"
                        BorderThickness="0"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        Margin="7 0 0 0"
                        MouseDoubleClick="mostPlayedVideoListView_MouseDoubleClick"
                        HorizontalContentAlignment="Stretch"
                        ItemContainerStyle="{DynamicResource favoritesSelectedStyle}"
                        Grid.Row="1">

                            <ListView.ContextMenu>
                                <ContextMenu>
                                    <MenuItem Header="Add to Now Playing" Click="addToNowPlayingVideoResult_OnClick" />
                                    <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingVideoResult_OnClick" />
                                    <Separator />
                                    <MenuItem Header="Playlists">
                                        <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistVideoResult_OnClick" />
                                        <MenuItem Header="Add to Playlist" Click="addToPlaylistVideoResult_OnClick" />
                                    </MenuItem>
                                </ContextMenu>
                            </ListView.ContextMenu>
                        </ListView>
                    </Grid>

                    <Grid Grid.Row="0" Grid.Column="1" Margin="6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0" Style="{StaticResource favoritesBigLabel}" Margin="0 0 0 0">recently played</TextBlock>

                        <ListView 
                        Name="recentlyPlayedVideoListView"
                        SelectionMode="Extended" 
                        ScrollViewer.CanContentScroll="True" 
                        AllowDrop="True" 
                        Background="Transparent"
                        BorderThickness="0"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        Margin="7 0 0 0"
                        MouseDoubleClick="recentlyPlayedVideoListView_MouseDoubleClick"
                        HorizontalContentAlignment="Stretch"
                        ItemContainerStyle="{DynamicResource favoritesSelectedStyle}"
                        Grid.Row="1">

                            <ListView.ContextMenu>
                                <ContextMenu>
                                    <MenuItem Header="Add to Now Playing" Click="addToNowPlayingVideoResult2_OnClick" />
                                    <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingVideoResult2_OnClick" />
                                    <Separator />
                                    <MenuItem Header="Playlists">
                                        <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistVideoResult2_OnClick" />
                                        <MenuItem Header="Add to Playlist" Click="addToPlaylistVideoResult2_OnClick" />
                                    </MenuItem>
                                </ContextMenu>
                            </ListView.ContextMenu>
                        </ListView>
                    </Grid>

                    <Grid Grid.Row="1" Grid.Column="0" Margin="6 10 6 6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0" Style="{StaticResource favoritesBigLabel}" Margin="0 0 0 0">favorites</TextBlock>

                        <ListView 
                        Name="favoriteVideoListView"
                        SelectionMode="Extended" 
                        ScrollViewer.CanContentScroll="True" 
                        AllowDrop="True" 
                        Background="Transparent"
                        BorderThickness="0"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        Margin="7 0 0 0"
                        MouseDoubleClick="favoriteVideoListView_MouseDoubleClick"
                        HorizontalContentAlignment="Stretch"
                        ItemContainerStyle="{DynamicResource favoritesSelectedStyle}"
                        Grid.Row="1">

                            <ListView.ContextMenu>
                                <ContextMenu>
                                    <MenuItem Header="Add to Now Playing" Click="addToNowPlayingVideoResult3_OnClick" />
                                    <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingVideoResult3_OnClick" />
                                    <Separator />
                                    <MenuItem Header="Playlists">
                                        <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistVideoResult3_OnClick" />
                                        <MenuItem Header="Add to Playlist" Click="addToPlaylistVideoResult3_OnClick" />
                                    </MenuItem>
                                </ContextMenu>
                            </ListView.ContextMenu>
                        </ListView>
                    </Grid>

                    <Grid Grid.Row="1" Grid.Column="1" Margin="6 10 6 6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <TextBlock Grid.Row="0" Style="{StaticResource favoritesBigLabel}" Margin="0 0 0 0">highest rated</TextBlock>

                        <ListView 
                        Name="highestRatedVideoListView"
                        SelectionMode="Extended" 
                        ScrollViewer.CanContentScroll="True" 
                        AllowDrop="True" 
                        Background="Transparent"
                        BorderThickness="0"
                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"
                        Margin="7 0 0 0"
                        HorizontalContentAlignment="Stretch"
                        ItemContainerStyle="{DynamicResource favoritesSelectedStyle}"
                        MouseDoubleClick="pinnedVideoListView_MouseDoubleClick"
                        Grid.Row="1">

                            <ListView.ContextMenu>
                                <ContextMenu>
                                    <MenuItem Header="Add to Now Playing" Click="addToNowPlayingVideoResult4_OnClick" />
                                    <MenuItem Header="Replace now playing with selection" Click="replaceNowPlayingVideoResult4_OnClick" />
                                    <Separator />
                                    <MenuItem Header="Playlists">
                                        <MenuItem Header="Add to New Playlist" Click="addToNewPlaylistVideoResult4_OnClick" />
                                        <MenuItem Header="Add to Playlist" Click="addToPlaylistVideoResult4_OnClick" />
                                    </MenuItem>
                                </ContextMenu>
                            </ListView.ContextMenu>
                        </ListView>
                    </Grid>
                </Grid>
            </TabItem>
        </TabControl>        
        
        <Grid Grid.Row="1" Margin="0,5,0,0" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="85" />
                <ColumnDefinition Width="150" />
                <ColumnDefinition Width="150" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Button x:Name="refreshButton" Grid.Column="0" Click="refreshButton_Click">Refresh</Button>

            <Label x:Name="mostPlayedSongLabel" Grid.Column="1" Margin="0,0,0,0" />

            <Label x:Name="mostWatchedVideoLabel" Grid.Column="2" Margin="0,0,0,0" />
            
            <Label Grid.Column="4" HorizontalAlignment="Right" Margin="0,0,0,0">This information will populate the more you use AMP.</Label>
        </Grid>
    </Grid>
</Page>
